/*
 *
 *      Copyright (c) 2018-2025, scs All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the pig4cloud.com developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: scs
 *
 */

package com.zyh.scs.admin.api.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.zyh.scs.admin.api.entity.SysPost;
import com.zyh.scs.admin.api.entity.SysRole;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author scs
 * @date 2017/10/29
 */
@Data
@Schema(description = "前端用户展示对象")
public class UserVO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @Schema(description = "主键")
    private Long userId;

    @Schema(description = "guid")
    private String guid;

    /**
     * 用户名
     */
    @Schema(description = "用户名")
    private String username;

    /**
     * 密码
     */
    @Schema(description = "密码")
    private String password;

    /**
     * 随机盐
     */
    @Schema(description = "随机盐")
    private String salt;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @Schema(description = "修改时间")
    private LocalDateTime updateTime;

    /**
     * 0-正常，1-删除
     */
    @Schema(description = "删除标记,1:已删除,0:正常")
    private String delFlag;

    /**
     * 锁定标记
     */
    @Schema(description = "锁定标记,0:正常,9:已锁定")
    private String lockFlag;

    /**
     * 密码过期标记
     */
    @Schema(description = "密码过期标记")
    private String passwordExpireFlag;

    /**
     * 密码修改时间
     */
    @Schema(description = "密码修改时间")
    private LocalDateTime passwordModifyTime;

    /**
     * 手机号
     */
//    @Sensitive(type = SensitiveTypeEnum.MOBILE_PHONE)
    @Schema(description = "手机号")
    private String phone;

    /**
     * 头像
     */
    @Schema(description = "头像")
    private String avatar;

    /**
     * 部门ID
     */
    @Schema(description = "所属部门")
    private Long deptId;

    /**
     * 部门名称
     */
    @Schema(description = "所属部门名称")
    private String deptName;

    /**
     * 角色列表
     */
    @Schema(description = "拥有的角色列表")
    private List<SysRole> roleList;

    /**
     * 角色列表
     */
    @Schema(description = "拥有的角色列表")
    private Long roleId;

    /**
     * 岗位列表
     */
    private List<SysPost> postList;

    /**
     * 昵称
     */
    @Schema(description = "昵称")
    private String nickname;

    /**
     * 姓名
     */
    @Schema(description = "姓名")
    private String name;

    /**
     * 邮箱
     */
    @Schema(description = "邮箱")
    private String email;

    /**
     * 工号
     */
    @Schema(description = "工号")
    private String userJobNumber;

    /**
     * 餐卡卡号
     */
    @Schema(description = "餐卡卡号")
    private String userMealsNumber;

    /**
     * 是否绑卡
     */
    @Schema(description = "是否绑卡 默认0否 1是")
    private Integer isTheCard;

    /**
     * 岗位
     */
    @Schema(description = "岗位")
    private String post;

    /**
     * 岗位
     */
    @Schema(description = "岗位id")
    private String postId;

    /**
     * 用户类型1内部员工2委外员工3见习员工4充值无管理费人员5委外单位6食堂职工7其他8外部
     */
    @Schema(description = "用户类型1内部员工2委外员工3见习员工4充值无管理费人员5委外单位6食堂职工7其他8外部")
    private Integer userType;

    /**
     * 现金账户金额元
     */
    @Schema(description = "现金账户金额元")
    private BigDecimal cashAccount;

    /**
     * 餐补账户账户金额元
     */
    @Schema(description = "餐补账户账户金额元")
    private BigDecimal cardAccount;

    /**
     * 账户
     */
    @Schema(description = "账户")
    private String userAccount;

    /**
     * 是否有权限 默认为1  无权限分配  2有权限
     */
    @Schema(description = "是否有权限 默认为1  无权限分配  2有权限")
    private Integer isTheAuthority;

    /**
     * 备注
     */
    @Schema(description = "备注")
    @TableField("note")
    private String note;

    /**
     * 泛微的psn_id   内部员工唯一标识
     */
    @Schema(description = "泛微的psn_id   内部员工唯一标识")
    private String psnId;

    /**
     * 所属公司
     */
    @Schema(description = "所属公司")
    private String companyName;

    /**
     * 所属公司id
     */
    @Schema(description = "所属公司id")
    private Long companyId;

    /**
     * 数据来源
     */
    @Schema(description = "数据来源  1泛微 2账户中心自建  3其他")
    private String dataSources;

    /**
     * 现金账户状态  1正常  2冻结
     */
    @Schema(description = "现金账户状态  1正常  2冻结")
    @TableField("cash_state")
    private String cashState;

    /**
     * 福利卡账户状态  1正常  2冻结
     */
    @Schema(description = "福利卡账户状态  1正常  2冻结")
    @TableField("card_state")
    private String cardState;

    /**
     * 是否为admin  1为否  2为是  默认为1
     */
    @Schema(description = "是否为admin  1为否  2为是  默认为1")
    @TableField("is_admin")
    private Integer isAdmin;
}
